FileName = "c:\testfile1.txt"
Set objShellApp = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set File = objFSO.OpenTextFile(FileName, 2, True)
Set colFolders = objShellApp.NameSpace(49).Items
For Each objFolder in colFolders
File.WriteLine objFolder.Name
wscript.echo objFolder.Name
Next
File.Close